﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace mes_tublay
{
    public partial class frmImageViewer : Form
    {
        public frmImageViewer()
        {
            InitializeComponent();
            DoGUIEvents();
            img.Width = this.ClientRectangle.Width;
            img.Height = this.ClientRectangle.Height;
        }
        void DoGUIEvents()
        {
            this.Resize += new EventHandler(delegate
            {
                img.Width = this.ClientRectangle.Width;
                img.Height = this.ClientRectangle.Height;
            });
        }

        /// <summary>
        /// Set the image to display.
        /// </summary>
        /// <param name="bmp">Image to display</param>
        public void SetImage(Bitmap bmp)
        {
            img.Image = bmp;
        }
    }
}
